package com.weiaibenpao.demo.chislim.presenter;

import com.weiaibenpao.demo.chislim.base.BasePresenter;
import com.weiaibenpao.demo.chislim.retrofit.RetrofitUtils;
import com.weiaibenpao.demo.chislim.retrofit.rx.NetWorkTransformer;
import com.weiaibenpao.demo.chislim.retrofit.rx.SimpleObserver;
import com.weiaibenpao.demo.chislim.view.ReleaseView;

/**
 * Created by wlx on 2018/1/4.
 */

public class ReleasePresenter extends BasePresenter<ReleaseView> {

    public void postHumor(int userId,String humorContent,String humorImgUrl,String humorVideoUrl,String humorpalce){
        RetrofitUtils.getAPIService().postAddHumor(userId,humorContent,humorImgUrl,humorVideoUrl,humorpalce)
                .compose(new NetWorkTransformer())
                .subscribe(new SimpleObserver(mCompositeDisposable) {

                    @Override
                    public void call(Object o) {
                        getView().requestSuccess("成功");
                    }

                });

    }
}
